-
Notifications
You must be signed in to change notification settings - Fork 345
Deprecate ScopeManager.active() #326
Deprecate ScopeManager.active() #326
Conversation
Tests still check the correctness of active(), and will be related when we actually remove it from our API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me.
public void captureScope() throws Exception { | ||
Span span = mock(Span.class); | ||
|
||
// We can't use 1.7 features like try-with-resources in this repo without meddling with pom details for tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we consider dropping support for 1.6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, about time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but hopefully in a separate PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im wondering whether we should try to discuss it for 0.32 or the next iteration ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be on-board doing it for 0.32, but it certainly should be a separate PR and broader discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a discussion is appropriate but I'm not sure we should hold 0.32 for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can discuss that as part of #218 and decide what to do from there - and I agree with @austinlparker, I think we shouldn't hold 0.32 for this change to happen ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Just added a commit to add the new example to the Unless somebody is not happy with this change, I will be merging this PR tomorrow in order to (very soon) issue a second 0.32 release candidate. |
Merged prior to preparing a second RC for 0.32 ;) |
* Deprecate the StringTag.set() overload taking a StringTag. (#262) * Implement Trace Identifiers. (#280) * Bump JaCoCo to use a Java 10 friendly version (#306) * Remove finish span on close (#301) * Deprecate finishSpanOnClose on activation. * Add ScopeManager.activeSpan() and Tracer.activateSpan(). * Clarify the API changes and deprecations. * Add an error reporting sample to opentracing-testbed. * Simple layer on top of ByteBuffer for BINARY format. (#276) * Add generic typed setTag/withTag (#311) * Allow injecting into maps of type Map<String,Object> (#310) * Add simple registerIfAbsent to global tracer (#289) * Split Inject and Extract Builtin interfaces (#316) * Deprecate ScopeManager.active() (#326) * Make Tracer extends Closable. (#329) * Do not make isRegistered() synchronized. (#333) * Deprecate AutoFinishScopeManager (#335)
Addresses #267
ScopeManager.active()
is deprecated.testbed
though.AutoFinishScopeManager
(a rather exoteric manager) to also offer its capture/continue workflow without relying on a publicly visibleScope
.Scope
object, being solved by using a thread-local field.Probably the important point is 5) - as it shows a concrete scenario that has historically prevented us from removing
active()
altogether. I'm hope this case is not over simplifying this requirement ;)@opentracing/opentracing-java-maintainers please feel free to leave your opinion, as I'd like to have this included in 0.32 if possible ;)